package com.liu.InterfaceDemo;

import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;


@Component(value = "beforeLog")
public class beforeLog implements MethodBeforeAdvice {

    public void before(Method method, Object[] args, Object target) throws Throwable {
        System.out.println("之前"+target.getClass().getName() + "类的"+method.getName() + "被执行了");
    }
}
